import React from "react";
import { Swiper, Image } from "react-vant";
import { images } from "../../demo/images";
import { useNavigate } from "react-router-dom";

export default function Carousel() {
  const navigate=useNavigate()
  return (
    <div className="demo-swiper">
      <Swiper>
        {images.map((image) => (
          <Swiper.Item key={image}  onClick={()=>navigate('/deafult/home')}>
            <Image lazyload src={image} />
          </Swiper.Item>
        ))}
      </Swiper>
    </div>
  );
}
